//
//  SendPrivatePhotosViewController.m
//  UniversalApp
//
//  Created by 志刚杨 on 2018/6/19.
//  Copyright © 2018年 voidcat. All rights reserved.
//

#import "SendPrivatePhotosViewController.h"
#import "PrivatePhotosCollectionViewCell.h"
@interface SendPrivatePhotosViewController ()<UICollectionViewDelegate>

@end

@implementation SendPrivatePhotosViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
}

-(void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath
{
    if([self.delegate respondsToSelector:@selector(sendPrivateClickPhotoWithUrl:AndImageID:)])
    {
        PrivatePhotosModel *model = self.logic.dataArray[indexPath.item];
        if(model.status == 1)
        {
            [self.delegate sendPrivateClickPhotoWithUrl:model.img2 AndImageID:StringFromInt(model.id)];
            [self.navigationController popViewControllerAnimated:NO];
        }
        else
        {
            [MBProgressHUD showTopTipMessage:ASLocalizedString(@"只能发送审核通过的私照")];
        }
    }
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
